package com.biz.primus.ms.geo.dao.repository;

import com.biz.primus.ms.base.jpa.repository.CommonJpaRepository;
import com.biz.primus.ms.geo.dao.po.Region;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author JKLiues
 * @date 2017/11/8
 */
@Repository
public interface RegionRepository extends CommonJpaRepository<Region, Integer> {

    /**
     * 根据status查询region信息
     *
     * @param status
     * @return region po集合
     */
    @Query("from Region region where region.status = ?1")
    List<Region> findRegionsBystatus(Integer status);
}
